<template>
	<view>
		<navbar title="客户详情" :isbg="false" :autoBack="true" :opacity='1'>
			
		</navbar>
		<view class="con">
			<view class="box">
				<view class="box__item">
					<view class="box__item__label">
						客户名称:
					</view>
					<view class="box__item__inp">
						{{form.name}}
					</view>
				</view>
				<view class="box__item">
					<view class="box__item__label">
						客户编号
					</view>
					<view class="box__item__inp">
						无
					</view>
				</view>
				<view class="box__item">
					<view class="box__item__label">
						联系人:
					</view>
					<view class="box__item__inp">
						{{form.contract}}
					</view>
				</view>
				<view class="box__item">
					<view class="box__item__label">
						联系电话:
					</view>
					<view class="box__item__inp">
						{{form.phone}}
					</view>
				</view>
				<view class="box__title">
					<view class="box__title__line">
						
					</view>
					地址
				</view>
				<view class="box__addr">
					{{form.address}}
				</view>
				<view class="box__item">
					<view class="box__item__label">
						备注
					</view>
					<view class="box__item__inp" style="text-align: left;margin-left: 40rpx;">
						{{form.remark}}
					</view>
				</view>
			</view>
			<view class="box" style="margin-top: 30rpx;">
				<view class="box__item" @click="navto('/pages/datagl/images?id='+form.id)">
					<view class="box__item__label">
						图片
					</view>
					<view class="box__item__inp" style="color: #2A51FA;">
						查看
					</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="box__item" @click="navto('/pages/datagl/jyjl?id='+form.id)">
					<view class="box__item__label">
						交易记录
					</view>
					<view class="box__item__inp" style="color: #2A51FA;">
						查看
					</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="box__item" @click="navto('/pages/datagl/hfjl?id='+form.id)">
					<view class="box__item__label">
						回访记录
					</view>
					<view class="box__item__inp" style="color: #2A51FA;">
						查看
					</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import datagl from '@/api/_datagl.js'
	export default {
		data() {
			return {
				form: {},
				id:''
			};
		},
		methods:{
			async getdetails(){
				let res = await datagl.getCustomerDetail({customer_id:this.id})
				if(res.data.code==1){
					this.form=res.data.data
				}
			}
		},
		onLoad(o) {
			this.id=o.id
			this.getdetails()
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F0F3F7;
	}

	.con {
		padding: 30rpx;
	}
	.box{
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		padding: 18rpx 4rpx 56rpx 30rpx;
		&__title{
			display: flex;
			align-items: center;
			font-family: PingFang-SC, PingFang-SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #6D6D6D;
			line-height: 28rpx;
			margin-bottom: 28rpx;
			margin-top: 36rpx;
			&__line{
				width: 6rpx;
				height: 27rpx;
				background: #2DA1E0;
				border-radius: 3rpx 3rpx 3rpx 3rpx;
				margin-right: 10rpx;
			}
		}
		&__item{
			height: 100rpx;
			border-bottom: 2rpx solid #F9F9F9;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-right: 25rpx;
			&__label{
				font-family: PingFang-SC, PingFang-SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #6D6D6D;
				line-height: 38rpx;
			}
			&__inp{
				font-family: PingFang-SC, PingFang-SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #020202;
				line-height: 38rpx;
				text-align: right;
				flex: 1;
			}
		}
		&__addr{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: 500;
			font-size: 26rpx;
			color: #010101;
			line-height: 38rpx;
			padding-bottom: 24rpx;
			border-bottom: 2rpx solid #F9F9F9;
		}
	}
	::v-deep.u-textarea{
		background-color: #F8F8F8!important;
		border-radius: 20rpx!important;
		padding: 20rpx!important;
	}
	.btn {
		width: 638rpx;
		height: 95rpx;
		background: #2A51FA;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-family: PingFang-SC, PingFang-SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #FFFFFF;
		line-height: 48rpx;
		margin-top: 39rpx;
	}
</style>